package net.dfrz.control.page;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import net.dfrz.domain.SmUser;
import net.dfrz.service.impl.HtBusinessService;

public class HtEditUserPage extends HttpServlet {
	private HtBusinessService bs = new HtBusinessService();
	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		String id = request.getParameter("id");
		if(id == null && "".equals(id))
		{
			return;
		}
		request.setAttribute("user", bs.getUserById(id));
		request.getRequestDispatcher("/WEB-INF/ht/edituser.jsp").forward(request, response);
	}

	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		doGet(request, response);
	}

}
